var ff = ff || {};
ff.obj = {};

ff.obj.merge = function(obj1,obj2)
{
	return deepMerge(obj1, obj2);
}
function deepMerge(obj1, obj2) {
    var key;
    for(key in obj2) {
        // 如果target(也就是obj1[key])存在，且是对象的话再去调用deepMerge，否则就是obj1[key]里面没这个对象，需要与obj2[key]合并
        obj1[key] = obj1[key] && obj1[key].toString() === "[object Object]" ?
        deepMerge(obj1[key], obj2[key]) : obj1[key] = obj2[key];
    }
    return obj1;
}
ff.obj.isArray = function(obj)
{
	if(null == obj)
	{
		return false;
	}
	if(obj instanceof Array)
	{
	 return true;	
	}
	return false;
};
ff.obj.isObject = function(obj)
{
	if(null == obj)
	{
		return false;
	}
	if(typeof a == "object")
	{
		return true;
	}
	return  false;
};
ff.obj.find = function(objList,name,value)
{
	if(null == objList)
	{
		return null;
	}
    for(var i=0;i<objList.length;i++)
    {
        if(objList[i][name] == value)
        {
            return objList[i];
        }
    }
    return null;
};

ff.obj.findList = function(objList,name,value)
{
     
};